
var _ = require('lodash');


var fp = require('lodash/fp');

const{ Maybe,Container} = require('./support');

let safeProp = fp.curry(function (x, o) {
  return Maybe.of(o[x]);
});
let user = { id: 2, name: 'Albert' };

console.log(safeProp('name',user));


// let ex3 = fp.flowRight(fp.map(fp.first), safeProp('name'));
// console.log(ex3(user));
let ex3 = () =>{
  return safeProp('name',user).map((x)=>fp.first(x))
}
console.log(ex3()._value);
